<script type="text/javascript" src="<?php echo WEB_LINK . "/lib/library/tiny_mce/tiny_mce.js";?>"></script>
<script type="text/javascript">
	 tinyMCE.init({
		mode : "exact",
		elements : "chitiet, huongdan, khuyenmai, hotro",
		theme : "advanced",
		plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
		
		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
		theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap,tablecontrols",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_resizing : true,
		theme_advanced_statusbar_location : "bottom",
		//theme_advanced_source_editor_height : 900
	});
</script>
<form name="form1" id="form1" action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="itemID" value="" />
<input type="hidden" name="mode" value="" />
<input type="hidden" name="type" value="" />
<table width="100%" border="0" cellpadding="5" cellspacing="2">
  <tr>
     <td width="20%" align="left" bgcolor="#FFFFCC">
       Tên :<input onkeyup="uncheckInputText(this.id)" type="text" size="50" name="name" id="name" value="<?php echo $this->dataPost['name'];?>" />
     </td>
   </tr>
   <input type="hidden" name="nameimage" value="<?php echo $this->tenFile; ?>" />
   <tr>
   	 <td valign="top" align="left" bgcolor="#FFFFCC">
   	 	<img src="<?php echo FunctionCommon::getImage('img-the-min', $this->tenFile);?>" /><br />
   	     <input onclick="frmSubmit('m=scategory&a=edit&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?><?php echo constants::$pathUrl;?>', '<?php echo $this->id; ?>', 'edit', 'delete')" type="button" name="delimage" id="delimage" value="Delete Image" style="cursor:pointer; color:#F00;" />
     </td>
   </tr>
   <tr>
   	 <td align="left" bgcolor="#FFFFCC">
   	 	<span class="span-text">Hình ảnh :</span><br />
   	 	<input type="file" name="code" id="code" size="50" />&nbsp;&nbsp;
   	 	<input onclick="frmSubmit('m=scategory&a=edit&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?><?php echo constants::$pathUrl;?>', '<?php echo $this->id; ?>', 'edit', 'upload')" type="button" name="uphinh" value="Upload Image">
   	 </td>
   </tr>
   	<tr>
   		<td align="left" bgcolor="#FFFFCC">
   			<span class="span-text">Thông tin chi tiết:</span><br />
     		<textarea name="chitiet" id="chitiet" cols="45" rows="5"><?php echo $this->dataPost['chitiet'];?></textarea>
     	</td>
   	</tr>
   	<tr>
   		<td align="left" bgcolor="#FFFFCC">
   			<span class="span-text">Hướng dẫn sử dụng:</span><br />
     		<textarea name="huongdan" id="huongdan" cols="45" rows="5"><?php echo $this->dataPost['huongdan'];?></textarea>
     	</td>
   	</tr>
   	<tr>
   		<td align="left" bgcolor="#FFFFCC">
   			<span class="span-text">Khuyến mãi:</span><br />
     		<textarea name="khuyenmai" id="khuyenmai" cols="45" rows="5"><?php echo $this->dataPost['khuyenmai'];?></textarea>
     	</td>
   	</tr>
   	<tr>
   		<td align="left" bgcolor="#FFFFCC">
   			<span class="span-text">Hỗ trợ:</span><br />
     		<textarea name="hotro" id="hotro" cols="45" rows="5"><?php echo $this->dataPost['hotro'];?></textarea>
     	</td>
   	</tr>
  <tr>
    <td align="center" bgcolor="#FFFFCC">
    	<table width="100%" border="0" cellpadding="0" cellspacing="6" class="fbutton">
    		<tr>
    			<td width="45%" align="right" class="fbutrg"><img onclick="window.location.assign('index.php?m=scategory&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?><?php echo constants::$pathUrl;?>')" src="images/default/back.png" border="0" width="34" title="back"/>&nbsp;&nbsp;&nbsp;</td>
    			<td width="55%" align="left">&nbsp;&nbsp;&nbsp;<span onclick="if (checkInputText('form1')) {frmSubmit('m=scategory&a=edit&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?><?php echo constants::$pathUrl;?>', '<?php echo $this->id; ?>', 'edit', 'edit');}" class="fbutlf"><?php echo $this->tpl_button;?></span></td>
    		</tr>
    	</table>
    
    </td>
    </tr>
</table>
</form>
<?php if ($this->dialog) :?>
<div id="allconfirm">
	<div id="popup-diet" class="ui-popup-diet ui-body-e ui-corner-all" style="top: 216px;">
	<p>Thông tin được update</p>
	<a href="#" onclick="window.location.assign('index.php?m=scategory&danhmucid=<?php echo $this->danhmucid;?>&iddm=<?php echo $this->iddm;?><?php echo constants::$pathUrl;?>')">OK</a>
	</div>
</div>
<?php endif;?>